﻿using UnityEngine;
using System.Collections;

[ExecuteInEditMode]	
public class IconOverheadNGUI : MonoBehaviour {
	
	UISprite sprite;
	float scaleFactor = 0.00333f;
	
	void Awake()
	{
		ResetScale(1.0f);
	}

	public void ResetScale(float scaleMod)
	{
		sprite = GetComponent<UISprite>();
		sprite.MakePixelPerfect();
		transform.localPosition = new Vector3(0,0,0);
		transform.localScale = new Vector3( transform.localScale.x * scaleFactor * scaleMod, transform.localScale.y * scaleFactor * scaleMod, transform.localScale.z);		
	}
}
